{extend name="base" /}
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">钩子管理</li>
            <li class=""><a href="{:url('admin/hook/add')}">添加钩子</a></li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <table class="layui-table">
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th>名称</th>
                        <th>简介</th>
                        <th>钩子来源</th>
                        <th>系统钩子</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="data_list" item="vo"}
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.description}</td>
                        <td>{$vo.source}</td>
                        <td>{if $vo.system}是{else /}否{/if}</td>
                        <td>{php}echo $vo['status'] ? '显示' : '隐藏';{/php}</td>
                        <td>
                            <a href="{:url('admin/hook/edit',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-mini">编辑</a>
                            {eq name="vo.system" value="0"}
                            <a href="{:url('admin/hook/delete',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-mini ajax-delete">删除</a>
                            {/eq}
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                </table>
                <!--分页-->
                {$pages|raw}
            </div>
        </div>
    </div>
</div>
{/block}